<?php

/**
 * Description of Error
 *
 * @author Kam
 */
class My_Form_Decorator_FormTitle extends Zend_Form_Decorator_Abstract
{

    public function render($content)
    {
        $e = $this->getElement();
        if (!($e instanceof My_Form)) {
            return $content;
        }
        $title = $e->getTitle();
        if ($title) {
            $html = '<h2 class="form-title">' . $title . '</h2>';
            return $html . $content;
        }
        return $content;
    }

}

?>
